/**
 * @fileoverview Normal select screen for Coding in Chrome editor.
 *
 * @license Copyright 2018 The Coding with Chrome Authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * @author mbordihn@google.com (Markus Bordihn)
 */
{namespace cwc.soy.SelectScreenNormal.robot autoescape="strict"}


/** Default icon. */
{template .icon}
  memory
{/template}


/**
 * Robot overview page.
 */
{template .template}
  {@param experimental: bool}
  {@param modules: ?}

  {call cwc.soy.SelectScreenTemplate.containerSub}
    {param content kind="html"}

      <div class="mdl-tabs__tab-bar">

        {call cwc.soy.SelectScreenTemplate.subTabBarLink data="all"}
          {param active: true /}
          {param id: 'beginner-robot_overview' /}
          {param name: '@@GENERAL__OVERVIEW' /}
        {/call}

        {call cwc.soy.SelectScreenTemplate.subTabBarLink data="all"}
          {param id: 'beginner-lego_ev3' /}
          {param module: 'lego' /}
          {param name: 'EV3' /}
        {/call}

        {if $experimental}
          {call cwc.soy.SelectScreenTemplate.subTabBarLink data="all"}
            {param id: 'beginner-lego_wedo2' /}
            {param module: 'lego' /}
            {param name: 'WeDo 2.0' /}
          {/call}
        {/if}

        {call cwc.soy.SelectScreenTemplate.subTabBarLink data="all"}
          {param id: 'beginner-makeblock_mbot' /}
          {param module: 'makeblock' /}
          {param name: 'mBot' /}
        {/call}

        {call cwc.soy.SelectScreenTemplate.subTabBarLink data="all"}
          {param id: 'beginner-makeblock_mbot_ranger' /}
          {param module: 'makeblock' /}
          {param name: 'mBot Ranger' /}
        {/call}

        {call cwc.soy.SelectScreenTemplate.subTabBarLink data="all"}
          {param id: 'beginner-sphero_classic' /}
          {param module: 'sphero' /}
          {param name: 'Sphero 2.0' /}
        {/call}

        {call cwc.soy.SelectScreenTemplate.subTabBarLink data="all"}
          {param id: 'beginner-sphero_sprk_plus' /}
          {param module: 'sphero' /}
          {param name: 'Sphero SPRK+' /}
        {/call}

        {if $experimental}
          {call cwc.soy.SelectScreenTemplate.subTabBarLink data="all"}
            {param id: 'beginner-sphero_bb8' /}
            {param module: 'sphero' /}
            {param name: 'Sphero BB-8' /}
          {/call}
        {/if}

      </div>

      <div class="cwc-select-screen-scroller">

        {call cwc.soy.SelectScreenTemplate.subTabBarContent}
          {param active: true /}
          {param id: 'beginner-robot_overview' /}
          {param content kind="html"}
            {call .overview data="all" /}
          {/param}
        {/call}

        {call cwc.soy.SelectScreenTemplate.subTabBarContent}
          {param id: 'beginner-lego_ev3' /}
          {param content kind="html"}
            {call cwc.soy.SelectScreenNormal.robot.lego.ev3.overview data="all" /}
          {/param}
        {/call}

        {if $experimental}
          {call cwc.soy.SelectScreenTemplate.subTabBarContent}
            {param id: 'beginner-lego_wedo2' /}
            {param content kind="html"}
              {call cwc.soy.SelectScreenNormal.robot.lego.weDo2.overview data="all" /}
            {/param}
          {/call}
        {/if}

        {call cwc.soy.SelectScreenTemplate.subTabBarContent}
          {param id: 'beginner-makeblock_mbot' /}
          {param content kind="html"}
            {call cwc.soy.SelectScreenNormal.robot.makeblock.mBot.overview data="all" /}
          {/param}
        {/call}

        {call cwc.soy.SelectScreenTemplate.subTabBarContent}
          {param id: 'beginner-makeblock_mbot_ranger' /}
          {param content kind="html"}
            {call cwc.soy.SelectScreenNormal.robot.makeblock.mBotRanger.overview data="all" /}
          {/param}
        {/call}

        {call cwc.soy.SelectScreenTemplate.subTabBarContent}
          {param id: 'beginner-sphero_classic' /}
          {param content kind="html"}
            {call cwc.soy.SelectScreenNormal.robot.sphero.classic.overview data="all" /}
          {/param}
        {/call}

        {call cwc.soy.SelectScreenTemplate.subTabBarContent}
          {param id: 'beginner-sphero_sprk_plus' /}
          {param content kind="html"}
            {call cwc.soy.SelectScreenNormal.robot.sphero.sprkPlus.overview data="all" /}
          {/param}
        {/call}

        {if $experimental}
          {call cwc.soy.SelectScreenTemplate.subTabBarContent}
            {param id: 'beginner-sphero_bb8' /}
            {param content kind="html"}
              {call cwc.soy.SelectScreenNormal.robot.sphero.bb8.overview data="all" /}
            {/param}
          {/call}
        {/if}

      </div>

    {/param}
  {/call}

{/template}


/**
 * Robots overview page.
 */
{template .overview}
  {@param experimental: bool}

  {call cwc.soy.SelectScreenTemplate.container}
    {param header kind="html"}
      {call cwc.soy.SelectScreenTemplate.header}
        {param title: 'Robots' /}
        {param opt_text: 'Simple robot control with blocks' /}
        {param opt_icon kind="html"}{call .icon /}{/param}
      {/call}
    {/param}

    {param content kind="html"}

      {call cwc.soy.SelectScreenTemplate.selectSection data="all"}
        {param title: 'Lego' /}
        {param id: 'beginner-lego' /}
        {param text: 'Control a real or virtual EV3 by assembling Blockly Blocks' /}
        {param opt_color_class: 'bg-orange' /}
        {param opt_icon: 'adb' /}

        {param content kind="html"}
          {call cwc.soy.SelectScreenTemplate.selectSectionLink}
            {param text: 'EV3 Robot' /}
            {param tab: 'beginner-lego_ev3' /}
          {/call}

          {if $experimental}
            {call cwc.soy.SelectScreenTemplate.selectSectionLink}
              {param text: 'WeDo 2.0 robot' /}
              {param tab: 'beginner-lego_wedo2' /}
            {/call}
          {/if}
        {/param}
      {/call}

      {call cwc.soy.SelectScreenTemplate.selectSection data="all"}
        {param title: 'Sphero' /}
        {param id: 'beginner-sphero' /}
        {param text: 'Control a real or virtual Sphero by assembling Blockly Blocks' /}
        {param opt_color_class: 'bg-orange' /}
        {param opt_icon: 'adjust' /}

        {param content kind="html"}
          {call cwc.soy.SelectScreenTemplate.selectSectionLink}
            {param text: 'Sphero 2.0 robot' /}
            {param tab: 'beginner-sphero_classic' /}
          {/call}

          {call cwc.soy.SelectScreenTemplate.selectSectionLink}
            {param text: 'Sphero SPRK+ robot' /}
            {param tab: 'beginner-sphero_sprk_plus' /}
          {/call}

          {if $experimental}
            {call cwc.soy.SelectScreenTemplate.selectSectionLink}
              {param text: 'Sphero BB-8 robot' /}
              {param tab: 'beginner-sphero_bb8' /}
            {/call}
          {/if}
        {/param}
      {/call}

      {call cwc.soy.SelectScreenTemplate.selectSection data="all"}
        {param title: 'MakeBlock' /}
        {param id: 'beginner-makeblock' /}
        {param text: 'Control an mBot by assembling Blockly Blocks' /}
        {param opt_color_class: 'bg-orange' /}
        {param opt_icon: 'functions' /}
        {param opt_icon_rotate: '90' /}

        {param content kind="html"}
          {call cwc.soy.SelectScreenTemplate.selectSectionLink}
            {param text: 'mBot - Blue Robot' /}
            {param tab: 'beginner-makeblock_mbot' /}
          {/call}

          {call cwc.soy.SelectScreenTemplate.selectSectionLink}
            {param text: 'mBot Ranger Robot' /}
            {param tab: 'beginner-makeblock_mbot_ranger' /}
          {/call}
        {/param}
      {/call}

    {/param}
  {/call}

{/template}
